<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html class=" -webkit-">
	<head>
	<meta charset="utf-8">
    <title>杰利联合</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
	<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
    <meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
    <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
    <meta content="no-cache" http-equiv="pragma">
    <meta content="0" http-equiv="expires">
    <meta content="telephone=no, address=no" name="format-detection">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <link rel="stylesheet" type="text/css" href="${ctxStatic}/jiu/css/mobile_module.css?v=1493085388" media="all">
    <script type="text/javascript" src="${ctxStatic}/jiu/js/jquery-2.0.3.min.js"></script>
	<script type="text/javascript" src="${ctxStatic}/jiu/js/prefixfree.min.js?v=1493085388"></script>
	<script type="text/javascript" src="${ctxStatic}/jiu/js/dialog.js?v=1493085388"></script>
	<script type="text/javascript" src="${ctxStatic}/jiu/js/flipsnap.min.js?v=1493085388"></script>
	<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <link href="${ctxStatic}/jiu/css/common.css?v=1493085388" rel="stylesheet" type="text/css">
    <style>
				
			.yin{
				
				background-color:rgba(0, 0, 0, 0.5);								
				width: 100%;
				height: 100%;								
				position: fixed;
				top: 0;
				left: 0;
				z-index: 9999;
				display: none;
			}
			.loading{
				line-height: 50px;
				width: 200px;
				height: 50px;
				display: none;
				background-color: rgba(23, 21, 21, 0.51);
				position: fixed;
				top: 50%;
				left: 50%;
				margin: -25px 0 0 -100px;
				z-index: 10000;				
				border-radius: 5px;
				-webkit-border-radius: 5px;
				color: #fff;
				text-align: center;
			}
		</style>
		<script type="text/javascript">
			wx.config({
			    debug: false,
			    appId: '${weChatAppId}',
			    timestamp: '${timestamp}',
			    nonceStr: '${nonceStr}',
			    signature: '${signature}',
			    jsApiList: [
			      'checkJsApi',
			      'onMenuShareTimeline',
			      'onMenuShareAppMessage',
			      'onMenuShareQQ',
			      'onMenuShareWeibo',
			      'hideMenuItems',
			      'showMenuItems',
			      'hideAllNonBaseMenuItem',
			      'showAllNonBaseMenuItem',
			      'translateVoice',
			      'startRecord',
			      'stopRecord',
			      'onRecordEnd',
			      'playVoice',
			      'pauseVoice',
			      'stopVoice',
			      'uploadVoice',
			      'downloadVoice',
			      'chooseImage',
			      'previewImage',
			      'uploadImage',
			      'downloadImage',
			      'getNetworkType',
			      'openLocation',
			      'getLocation',
			      'hideOptionMenu',
			      'showOptionMenu',
			      'closeWindow',
			      'scanQRCode',
			      'chooseWXPay',
			      'openProductSpecificView',
			      'addCard',
			      'chooseCard',
			      'openCard'
			    ]
			});
			
			function closehh(){
				wx.closeWindow();
			}
	</script>
	</head>
<body>
<div class="container">
  <!-- 订单信息 -->
  <div class="order_info">
    <p class="t">订单编号：${jiuOrder.orderNo}</p>
    <ul>    
         <li class="order_item"> <img src="${ctxUser }/jiu/${jiuOrder.manufactorLogo}">
          <div class="info">
            <p class="name">${jiuOrder.manufactorName}</p>
            <p class="property"> <span class="colorless">价格</span> <span class="orange">${jiuOrder.unitPrice}积分</span> </p>
            <p class="property"> <span class="colorless">数量</span> <span>${jiuOrder.orderNum}</span> </p>
          </div>
        </li>    
    </ul>
    <p class="order_remark">
      <textarea placeholder="撤销订单原因" name="remark" id="remark"></textarea>
    </p>
	<input type="hidden" name="id" value="8905">
<input type="hidden" name="manager_id" value="194175">
    <p class="total_price"> <span class="orange">共${jiuOrder.totalPrice}积分</span> </p>
 	 	<a style="margin-bottom: 10px;" class="btn blue_btn" href="javascript:ajaxApplyRevoke()">申请撤销订单</a>
 </div>		 
</div>

<div class="yin">
		</div>
		<div class="loading" >			
			 <img alt="" src="${ctxStatic}/jiu/img/icon32_loading_dark.gif">正在提交，请稍后...	
		</div>
		<script>
			$(document).ready(function() {
				$('.btn').click(function() {
					$('.loading').fadeIn().delay(3000).fadeOut();
					$('.yin').fadeIn(300).delay(3000).fadeOut();
				})
			});			
		</script>


<script type="text/javascript">
	window.alert = function(name){
	  var iframe = document.createElement("IFRAME");
	  iframe.style.display="none";
	  iframe.setAttribute("src", 'data:text/plain,');
	  document.documentElement.appendChild(iframe);
	  window.frames[0].window.alert(name);
	  iframe.parentNode.removeChild(iframe);
	 };
	 
	 window.confirm = function (message) {
	   var iframe = document.createElement("IFRAME");
	   iframe.style.display = "none";
	   iframe.setAttribute("src", 'data:text/plain,');
	   document.documentElement.appendChild(iframe);
	   var alertFrame = window.frames[0];
	   var result = alertFrame.window.confirm(message);
	   iframe.parentNode.removeChild(iframe);
	   return result;
	 };


function ajaxApplyRevoke(){
	$('.loading').show();
	var remark = $('#remark').val();
	 $.getJSON("${ctxFront }/jiu/ajaxApplyRevoke",{orderId:"${jiuOrder.id}",remarks:remark}, function(data){
         if(data.msg=='success'){
        	 if("${not empty jiuReceiver}" =="true"){
         	 window.location.href="${ctxFront}/jiu/index?v="+Math.random();
          }else{ 
	        	 window.location.href="${ctxFront}/jiu/factoryOrder?uid=${uid}&v="+Math.random();
        	   } 
         }
    });
}
</script>
</body>
</html>
